package com.lsu.app.mapper;

import com.lsu.app.bean.UserTaste;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Set;

/**
 *
 * @description 针对表【user_taste(用户兴趣标签)】的数据库操作Mapper
 * @Date 2023-10-23 19:28:40
 * @author hjj
 */
@Mapper
public interface UserTasteMapper extends BaseMapper<UserTaste> {
    @Select("select taste_value_id from user_taste where user_id=#{id}")
    List<Integer> getValuesByUserId(Integer id);//获取兴趣标签id
    @Select("select kind_id from taste_kind where taste_id = #{tasteId}")
    Set<Integer> getKindsByTasteId(Integer tasteId);//根据兴趣id获取所有课程类别id
    @Select("select value from kv_code where type=3 and value>0")
    Set<Integer> getAllKindIds();//获取所有课程类别
}




